package goldeneagle.com.entity;
public class CartItem {
	private Product product;
	private int count;
	private int price;

	public CartItem() {
		super();
	}
	
	public CartItem(Product product, int count, int price) {
		super();
		this.product = product;
		this.count = count;
		this.price = price;
	}

	public Product getProduct() {
		return product;
	}
	public void setProduct(Product product) {
		this.product = product;
	}
	public int getCount() {
		return count;
	}
	public void setCount(int count) {	
		this.count = count;
		//计算购物项的价格
		this.price = product.getPrice()*this.count;
	}
	public int getPrice() {
		return price;
	}
	public void setPrice(int price) {
		this.price = price;
	}
	
	
}
